let menu=[
  {name:'张三',num:'7',num1:'1'},  
  {name:'李四',num:'7',num1:'1'},  
  {name:'李斯',num:'7',num1:'1'},  
  {name:'阿迪',num:'7',num1:'1'},  
  {name:'尼克',num:'7',num1:'1'},  
  {name:'铁牛',num:'7',num1:'1'},  
]
let newDate=menu
function showMenu(data){
  $('#tbody').html('')
  $.each(data,(index,item)=>{
    $('#tbody').append(`
    <tr>
    <td class="col-md-1 item">${item.name}</td> 
    <td class="col-md-1 item">${item.num}</td> 
    <td class="col-md-1 item">${item.num1}</td> 
    <td class="col-md-1 item">${item.num1}</td> 
    <td class="col-md-1 item">${item.num1}</td> 
    <td class="col-md-1 item">${item.num1}</td> 
    <td class="col-md-1 item">${item.num1}</td> 
    <td class="col-md-1 item">${item.num1}</td> 
    <td class="col-md-1 item">${item.num1}</td> 
  
    </tr>
    `)
})
}
showMenu(newDate)
//查询
$('#chaxun').click(function (){
  let data1=$('#input_1').val()
  let data2
  let data3
  newDate=[]
  for (let i = 0; i <menu.length; i++) {
  if(menu[i].name==data1){
    newDate.push(menu[i])
    showMenu(newDate)
  }else if(menu[i].bumen==data2){}
  else if(menu[i].state==data3){}
  }
 })
 //重置
 $('#chongzhi').click(function () {
  showMenu(menu)
})